import { onMounted, onUnmounted } from 'vue'
import { useRoute } from 'vue-router'
import emitter from '@/utils/emitter'   //启用emitt


export const useChangeCardStatus = () => {
    const route = useRoute()
    onMounted(() => {
        console.log('当前文章', route.query);
        emitter.emit('readArticle', true)
    })
    onUnmounted(() => {
        emitter.emit('readArticle', false)
    })
}